import request from '@/utils/request'

// 查询商家列表
export function listMerchant(query) {
  return request({
    url: '/merchant/merchant/list',
    method: 'get',
    params: query
  })
}
export function businessCheck() {
  return request({
    url: '/merchant/merchant/businessCheck',
    method: 'get',
  })
}
export function bankcheck(bankCode) {
  return request({
    url: '/merchant/merchant/bankCheck/'+bankCode,
    method: 'get'
  })
}
// 查询商家详细
export function getMerchant(mid) {
  return request({
    url: '/merchant/merchant/' + mid,
    method: 'get'
  })
}

// 新增商家
export function addMerchant(data) {
  return request({
    url: '/merchant/merchant',
    method: 'post',
    data: data
  })
}

// 修改商家
export function updateMerchant(data) {
  return request({
    url: '/merchant/merchant',
    method: 'put',
    data: data
  })
}
export function idcheck(id,name) {
  return request({
    url: '/merchant/merchant/idcheck1/'+id+'/'+name,
    method: 'post',

  })
}

// 删除商家
export function delMerchant(mid) {
  return request({
    url: '/merchant/merchant/' + mid,
    method: 'delete'
  })
}
